package org.example.controller;

import org.example.dto.LoginDto;
import org.example.service.SysLoginService;
import org.example.utils.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Rommel
 * @version 1.0
 * @date 2023/6/13-17:20
 * @description TODO
 */
@RestController
@RequestMapping("/sys")
public class SysLoginController {

    @Resource
    private SysLoginService sysLoginService;




    @PostMapping("/login")
    public ResponseResult login(@RequestBody LoginDto loginDto){

        return sysLoginService.login(loginDto);
    }

    @PostMapping("/loginOut")
    public ResponseResult loginOut(){
        return sysLoginService.loginOut();
    }

}
